/* 在导航栏下面显示的模板市场样式 */
.template-marketplace-below-nav {
  width: 100%;
  height: calc(100vh - 60px); /* 减去导航栏高度 */
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid #e2e8f0;
}

.template-marketplace-below-nav .template-marketplace-fullscreen {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  height: 100%;
  width: 100%;
  z-index: auto;
}

.template-marketplace-below-nav .marketplace-header {
  background: linear-gradient(135deg, #f5f5dc 0%, #f0ead6 100%);
  padding: 15px 24px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.template-marketplace-below-nav .back-btn {
  background: #2c3e50;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-marketplace-below-nav .back-btn:hover {
  background: #34495e;
  transform: translateY(-1px);
}

.template-marketplace-below-nav .marketplace-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.template-marketplace-below-nav .marketplace-nav {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  flex-shrink: 0;
}

/* 全屏模板市场样式 */
.template-marketplace-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.template-marketplace-fullscreen .marketplace-header {
  background: linear-gradient(135deg, #f5f5dc 0%, #f0ead6 100%);
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.template-marketplace-fullscreen .back-btn {
  background: #2c3e50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-marketplace-fullscreen .back-btn:hover {
  background: #34495e;
  transform: translateY(-1px);
}

.template-marketplace-fullscreen .marketplace-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.template-marketplace-fullscreen .marketplace-nav {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  flex-shrink: 0;
}

/* 收藏功能样式 */
.favorite-btn {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorite-btn:hover {
  background: #e2e8f0;
  color: #475569;
  transform: translateY(-1px);
}

.favorite-btn.favorited {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.favorite-btn.favorited:hover {
  background: #fee2e2;
}

/* 移除评论姓名输入的样式调整 */
.comment-form .form-row-no-name {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* 模板市场主容器 */
.template-marketplace-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

.template-marketplace {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 95vw;
  height: 90vh;
  max-width: 1400px;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.4s ease-out;
}

/* 头部区域 - 使用米色背景 */
.marketplace-header {
  background: linear-gradient(135deg, #f5f5dc 0%, #f0ead6 100%);
  color: #5d4e37;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marketplace-header .header-left h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #5d4e37;
}

.marketplace-header .header-left p {
  margin: 4px 0 0 0;
  font-size: 14px;
  opacity: 0.8;
  color: #8b7355;
}

.marketplace-header .close-btn {
  background: rgba(93, 78, 55, 0.1);
  border: 1px solid rgba(93, 78, 55, 0.2);
  color: #5d4e37;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.marketplace-header .close-btn:hover {
  background: rgba(93, 78, 55, 0.2);
  border-color: rgba(93, 78, 55, 0.3);
  transform: scale(1.05);
}

/* 导航标签页 - 优化设计 */
.marketplace-nav {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 30px;
  display: flex;
  gap: 0;
}

/* 主内容区域 - 添加滚动功能 */
.marketplace-content {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  background: #f8fafc;
}

.nav-tab {
  background: transparent;
  border: none;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab:hover {
  color: #2c3e50;
  background: rgba(44, 62, 80, 0.05);
}

.nav-tab.active {
  color: #2c3e50;
  border-bottom-color: #2c3e50;
  background: rgba(44, 62, 80, 0.08);
  font-weight: 600;
}

.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2c3e50, #34495e);
  border-radius: 0 0 2px 2px;
}

/* 市场切换标签 */
.market-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.market-tab {
  background: white;
  border: 2px solid #e2e8f0;
  color: #64748b;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-tab:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.market-tab.active {
  background: #2c3e50;
  border-color: #2c3e50;
  color: white;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.2);
}

.market-tab.disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.market-tab.disabled:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

/* 搜索和筛选区域 */
.search-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  flex: 1;
  min-width: 300px;
}

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-bar input:focus {
  border-color: #2c3e50;
}

.search-btn {
  background: #2c3e50;
  border: 2px solid #2c3e50;
  border-left: none;
  color: white;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: #34495e;
  border-color: #34495e;
}

.filters select {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.filters select:focus {
  border-color: #2c3e50;
}

/* 模板卡片网格 */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 0;
}

.template-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 280px; /* 改为最小高度而不是固定高度 */
  max-height: 350px; /* 添加最大高度限制 */
}

.template-card:hover {
  border-color: #2c3e50;
  box-shadow: 0 8px 24px rgba(44, 62, 80, 0.12);
  transform: translateY(-2px);
}

.template-preview {
  height: 80px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 500;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0; /* 防止预览区域被压缩 */
}

.template-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 防止内容溢出 */
}

.template-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* 标题过长时显示省略号 */
}

.template-info p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 描述最多显示2行 */
  -webkit-box-orient: vertical;
}

.template-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  flex-shrink: 0; /* 防止元数据被压缩 */
}

.template-meta span {
  font-size: 12px;
  color: #475569;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 50px; /* 限制标签区域高度 */
  overflow: hidden; /* 隐藏超出的标签 */
}

.template-tags .tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.template-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  flex-shrink: 0; /* 确保按钮区域始终可见 */
}

.use-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.use-btn {
  background: #2c3e50;
  color: white;
  border: 1px solid #2c3e50;
}

.use-btn:hover {
  background: #34495e;
  border-color: #34495e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

/* 上传步骤指示器 - 优化设计 */
.upload-steps {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
  padding: 24px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  position: relative;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  text-align: center;
}

.step.active .step-number {
  background: #2c3e50;
  color: white;
  box-shadow: 0 0 0 4px rgba(44, 62, 80, 0.2);
  animation: pulse 2s infinite;
}

.step.active .step-label {
  color: #2c3e50;
  font-weight: 600;
}

.step.completed .step-number {
  background: #10b981;
  color: white;
  position: relative;
}

.step.completed .step-number::after {
  content: '✓';
  position: absolute;
  font-size: 14px;
  font-weight: bold;
}

.step.completed .step-label {
  color: #059669;
  font-weight: 500;
}

/* 脉冲动画 */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(44, 62, 80, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(44, 62, 80, 0);
  }
}

/* 上传模板容器 */
.upload-template {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 上传内容区域 - 确保可滚动 */
.upload-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
}

/* 步骤内容区域 */
.step-content h3 {
  color: #1e293b;
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  background: white;
  color: #374151;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* 步骤操作按钮 */
.step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  gap: 16px;
}

.prev-btn, .next-btn, .publish-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
}

.prev-btn {
  background: #f8fafc;
  color: #64748b;
  border: 2px solid #e2e8f0;
}

.prev-btn:hover {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.next-btn, .publish-btn {
  background: #2c3e50;
  color: white;
  border: 2px solid #2c3e50;
}

.next-btn:hover, .publish-btn:hover {
  background: #34495e;
  border-color: #34495e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

.next-btn:disabled, .publish-btn:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.6;
}

.next-btn:disabled:hover, .publish-btn:disabled:hover {
  background: #9ca3af;
  border-color: #9ca3af;
  transform: none;
}

/* 思维导图选择区域 */
.mindmap-selection h4 {
  color: #1e293b;
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
}

.mindmap-selection p {
  color: #64748b;
  margin: 0 0 20px 0;
  font-size: 14px;
}

.mindmap-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
}

.mindmap-item {
  display: flex;
  align-items: flex-start; /* 改为flex-start以支持多行内容 */
  gap: 16px;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  width: 100%; /* 确保容器宽度 */
  box-sizing: border-box; /* 包含padding和border在宽度计算中 */
}

.mindmap-item:hover {
  border-color: #2c3e50;
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.1);
}

.mindmap-item.selected {
  border-color: #2c3e50;
  background: #f8fafc;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.mindmap-preview .preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0; /* 防止图标收缩 */
}

.mindmap-info {
  flex: 1;
  min-width: 0; /* 允许flex项目收缩到内容宽度以下 */
  overflow: hidden; /* 隐藏溢出内容 */
}

.mindmap-info h5 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #1e293b;
  font-weight: 600;
  word-wrap: break-word; /* 长单词换行 */
  overflow-wrap: break-word; /* 现代浏览器的换行属性 */
  line-height: 1.3;
}

.mindmap-info .mindmap-description {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.4;
  word-wrap: break-word; /* 长单词换行 */
  overflow-wrap: break-word; /* 现代浏览器的换行属性 */
  max-height: 60px; /* 限制描述的最大高度 */
  overflow: hidden; /* 隐藏超出的内容 */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* 最多显示3行 */
  -webkit-box-orient: vertical;
}

.mindmap-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.mindmap-stats .stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
}

.mindmap-stats .stat-icon {
  font-size: 14px;
}

.mindmap-badges {
  display: flex;
  gap: 8px;
}

.mindmap-badges .badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.badge.current {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.local {
  background: #dcfce7;
  color: #166534;
}

.badge.server {
  background: #fef3c7;
  color: #92400e;
}

.selected-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2c3e50;
  color: white;
  font-weight: bold;
}

/* 市场选择选项 */
.market-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.market-option {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.market-option:hover {
  border-color: #2c3e50;
}

.market-option.selected {
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.market-option.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f9fafb;
}

.market-option label {
  display: block;
  padding: 20px;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.market-option input {
  display: none;
}

.option-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.option-icon {
  font-size: 20px;
}

.option-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.market-option p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

/* 隐私设置 */
.privacy-settings h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: #2c3e50;
}

/* 确认发布摘要 */
.upload-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.summary-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.summary-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.summary-section p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #64748b;
}

.summary-section p strong {
  color: #374151;
  font-weight: 500;
}

/* 我的模板页面 */
.my-templates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.my-templates-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

.templates-stats {
  display: flex;
  gap: 24px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.my-templates-list,
.my-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.my-template-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.my-template-card:hover {
  border-color: #2c3e50;
  box-shadow: 0 8px 24px rgba(44, 62, 80, 0.12);
}

.my-template-card .template-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.my-template-card .template-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  flex-shrink: 0;
}

.edit-btn, .analytics-btn, .delete-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: 1px solid;
}

.edit-btn {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.edit-btn:hover {
  background: #bfdbfe;
  color: #1e40af;
}

.analytics-btn {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.analytics-btn:hover {
  background: #bbf7d0;
  color: #14532d;
}

.delete-btn {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.delete-btn:hover {
  background: #fecaca;
  color: #b91c1c;
}

/* 加载和空状态 */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #2c3e50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

.empty-state p {
  margin: 0 0 24px 0;
  font-size: 14px;
  color: #6b7280;
}

.upload-first-btn {
  background: #2c3e50;
  color: white;
  border: 2px solid #2c3e50;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-first-btn:hover {
  background: #34495e;
  border-color: #34495e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

/* 错误提示 */
.error-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInFromRight 0.3s ease-out;
}

.error-toast button {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  margin-left: 8px;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .template-marketplace {
    width: 95vw;
    height: 95vh;
    margin: 0;
  }
  
  .marketplace-header {
    padding: 16px 20px;
  }
  
  .marketplace-nav {
    padding: 0 20px;
  }
  
  .marketplace-content {
    padding: 20px;
  }
  
  .templates-grid {
    grid-template-columns: 1fr;
  }
  
  .search-filters {
    flex-direction: column;
  }
  
  .search-bar {
    min-width: 100%;
  }
  
  .upload-summary {
    grid-template-columns: 1fr;
  }
  
  .market-options {
    grid-template-columns: 1fr;
  }
  
  .my-templates-list,
  .my-templates-grid {
    grid-template-columns: 1fr;
  }
}

/* 思维导图选择区域优化 */
.mindmap-selection .selection-info {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #2c3e50;
}

.mindmap-selection .selection-info p {
  margin: 0 0 10px 0;
  color: #5d4e37;
  font-weight: 500;
}

.selected-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #e8f5e8;
  border-radius: 6px;
  border: 1px solid #4caf50;
  margin-top: 10px;
}

.selected-icon {
  color: #4caf50;
  font-weight: bold;
}

.clear-selection-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: auto;
  transition: all 0.2s ease;
}

.clear-selection-btn:hover {
  background: #ffebee;
  color: #f44336;
}

.no-mindmaps {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.no-mindmaps .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-mindmaps h4 {
  margin: 0 0 8px 0;
  color: #333;
}

.no-mindmaps p {
  margin: 0;
  font-size: 14px;
}

/* 思维导图网格布局 */
.mindmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.mindmap-item {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  position: relative;
}

.mindmap-item:hover {
  border-color: #2c3e50;
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.1);
  transform: translateY(-2px);
}

.mindmap-item.selected {
  border-color: #4caf50;
  background: #f8fff8;
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.2);
}

/* 发布预览页面优化 */
.publish-preview {
  max-width: 100%;
  margin: 0 auto;
}

.config-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.config-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.config-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.config-card .card-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.config-card h4 {
  margin: 0 0 16px 0;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.info-row .label {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.info-row .value {
  color: #1e293b;
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

.market-badge {
  background: #e8f5e8;
  color: #2e7d32;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.badge-source {
  background: #e3f2fd;
  color: #1565c0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
}

/* 描述预览 */
.description-preview {
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.description-preview h4 {
  margin: 0 0 12px 0;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
}

.description-content {
  color: #4a5568;
  line-height: 1.6;
  font-size: 14px;
  background: white;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  min-height: 60px;
}

/* 发布条款 */
.publish-terms {
  background: #fff8e1;
  border: 1px solid #ffb74d;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: #5d4e37;
}

.terms-checkbox input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: #2c3e50;
}

.terms-checkbox .checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 3px;
  display: inline-block;
  position: relative;
  background: white;
  transition: all 0.2s ease;
}

.terms-checkbox input[type="checkbox"]:checked + .checkmark {
  background: #2c3e50;
  border-color: #2c3e50;
}

.terms-checkbox input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  color: white;
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 12px;
  font-weight: bold;
}

/* 发布按钮优化 */
.publish-btn:disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.publish-btn:disabled:hover {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .config-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .mindmap-grid {
    grid-template-columns: 1fr;
  }
  
  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .info-row .value {
    text-align: left;
    max-width: 100%;
  }
}

/* 模板详情弹窗样式 */
.template-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.template-detail-modal {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f5f5dc 0%, #f0ead6 100%);
}

.detail-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
}

.detail-content {
  display: flex;
  flex-direction: column;
  max-height: calc(80vh - 80px);
}

.detail-main {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.template-preview-large {
  height: 120px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 2px solid #e2e8f0;
}

.preview-placeholder-large {
  font-size: 16px;
  font-weight: 500;
  color: #64748b;
}

.template-info-detailed h4 {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 12px 0;
}

.template-info-detailed .description {
  font-size: 16px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
}

.template-meta-detailed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-label {
  font-weight: 500;
  color: #475569;
  min-width: 80px;
}

.meta-value {
  color: #1e293b;
}

.template-tags-detailed {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tags-label {
  font-weight: 500;
  color: #475569;
}

.template-tags-detailed .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-tags-detailed .tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.detail-actions {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.use-template-btn {
  flex: 1;
  background: #2c3e50;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.use-template-btn:hover {
  background: #34495e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

.cancel-btn {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-btn:hover {
  background: #e2e8f0;
  color: #475569;
}

/* 编辑模板弹窗样式 */
.edit-template-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.edit-template-modal {
  background: white;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f5f5dc 0%, #f0ead6 100%);
}

.edit-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
}

.edit-content {
  display: flex;
  flex-direction: column;
  max-height: calc(90vh - 80px);
}

.edit-form {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2c3e50;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal !important;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.edit-actions {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.save-template-btn {
  flex: 1;
  background: #2c3e50;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-template-btn:hover:not(:disabled) {
  background: #34495e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

.save-template-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 弹窗动画 */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 增强版模板详情弹窗样式 */
.template-detail-modal-enhanced {
  background: white;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  animation: modalSlideIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

.detail-header-enhanced {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f5f5dc 0%, #f0ead6 100%);
}

.header-left h3 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #64748b;
}

.rating-text {
  font-weight: 500;
}

.like-btn {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 16px;
  background: #f1f5f9;
  transition: all 0.2s ease;
  user-select: none;
}

.like-btn:hover {
  background: #e2e8f0;
}

.like-btn.liked {
  background: #fef2f2;
  color: #dc2626;
}

/* 星级评分样式 */
.star-rating {
  display: flex;
  gap: 2px;
}

.star {
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  user-select: none;
}

.star.filled {
  filter: brightness(1.2);
}

.star.readonly {
  cursor: default;
}

.star:not(.readonly):hover {
  transform: scale(1.1);
}

/* 详情页面标签页 */
.detail-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
  flex: 1;
  padding: 16px 20px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  background: #f1f5f9;
  color: #475569;
}

.tab-btn.active {
  background: white;
  color: #2c3e50;
  border-bottom-color: #2c3e50;
}

/* 详情内容区域 */
.detail-content-enhanced {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #64748b;
}

.loading-spinner {
  font-size: 32px;
  margin-bottom: 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 基本信息标签页 */
.info-tab-content {
  padding: 24px 28px;
}

.template-preview-section {
  margin-bottom: 24px;
}

.preview-large {
  height: 160px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e2e8f0;
}

.preview-content {
  font-size: 18px;
  font-weight: 600;
  color: #64748b;
}

.template-info-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.info-card h5 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.info-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.info-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-enhanced {
  background: #e0f2fe;
  color: #0369a1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-box {
  text-align: center;
  padding: 16px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* 评论标签页 */
.comments-tab-content {
  padding: 24px 28px;
  max-height: 500px;
  overflow-y: auto;
}

.comment-input-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.comment-input-section h5 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.user-name-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.user-name-input:focus {
  outline: none;
  border-color: #2c3e50;
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #374151;
}

.comment-textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.comment-textarea:focus {
  outline: none;
  border-color: #2c3e50;
}

.submit-comment-btn {
  align-self: flex-start;
  background: #2c3e50;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-comment-btn:hover:not(:disabled) {
  background: #34495e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

.submit-comment-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.comments-list-section h5 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 600;
  color: #374151;
}

.comment-rating {
  display: flex;
  align-items: center;
}

.comment-date {
  font-size: 12px;
  color: #9ca3af;
  margin-left: auto;
}

.comment-content {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 12px;
}

.comment-actions {
  display: flex;
  gap: 12px;
}

.comment-like-btn,
.comment-reply-btn {
  background: none;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-like-btn:hover,
.comment-reply-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.no-comments {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.load-more-btn {
  width: 100%;
  margin-top: 20px;
  padding: 12px 24px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.load-more-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* 预览标签页 */
.preview-tab-content {
  padding: 24px 28px;
}

.preview-section h5 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

.template-preview-full {
  background: #f8fafc;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #e2e8f0;
}

.preview-placeholder-full {
  display: flex;
  gap: 40px;
  align-items: center;
}

.preview-info {
  flex: 1;
}

.preview-info h6 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.preview-info p {
  margin: 8px 0;
  color: #64748b;
}

.preview-mockup {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.node-mockup {
  background: #2c3e50;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
}

.arrow-mockup {
  font-size: 20px;
  color: #64748b;
}

/* 增强版操作按钮 */
.detail-actions-enhanced {
  display: flex;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.use-template-btn-enhanced {
  flex: 1;
  background: #2c3e50;
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.use-template-btn-enhanced:hover {
  background: #34495e;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.download-btn,
.share-btn {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.download-btn:hover,
.share-btn:hover {
  background: #e2e8f0;
  color: #475569;
  transform: translateY(-1px);
}

.cancel-btn-enhanced {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-btn-enhanced:hover {
  background: #e2e8f0;
  color: #475569;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .template-detail-modal-enhanced {
    max-width: 95vw;
    max-height: 95vh;
  }
  
  .header-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .info-cards-row {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .detail-actions-enhanced {
    flex-wrap: wrap;
  }
  
  .preview-placeholder-full {
    flex-direction: column;
    gap: 20px;
  }
}

/* 模板详情页面样式 - 在导航栏下方显示 */
.template-detail-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.detail-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.back-to-browse-btn {
  background: #6b7280;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-to-browse-btn:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.detail-title-area {
  flex: 1;
  margin: 0 24px;
}

.detail-title-area h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.detail-stats-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #6b7280;
}

.detail-stats-inline .star-rating {
  display: inline-flex;
  gap: 2px;
}

.detail-sub-nav {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 24px;
  flex-shrink: 0;
}

.detail-sub-nav .tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.detail-sub-nav .tab-btn:hover {
  color: #374151;
  background: #f3f4f6;
}

.detail-sub-nav .tab-btn.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: white;
}

.detail-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.template-basic-info h4 {
  margin: 24px 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-basic-info h4:first-child {
  margin-top: 0;
}

.template-basic-info p {
  margin: 0 0 16px 0;
  line-height: 1.6;
  color: #4b5563;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: 14px;
  color: #6b7280;
}

.comment-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.comment-form h5 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.rating-input span {
  font-weight: 500;
  color: #374151;
}

.comment-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 16px;
}

.comment-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.submit-comment-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-comment-btn:hover {
  background: #2563eb;
}

.submit-comment-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.comments-list {
  space: 16px;
}

.comment-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}

.comment-author {
  font-weight: 500;
  color: #374151;
}

.comment-date {
  color: #6b7280;
  margin-left: auto;
}

.comment-content {
  color: #4b5563;
  line-height: 1.5;
}

.no-comments {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-style: italic;
}

/* 模板卡片按钮样式优化 */
.template-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.use-template-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.use-template-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}



.favorite-btn {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.favorite-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.favorite-btn.favorited {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.favorite-btn.favorited:hover {
  background: #fee2e2;
}

/* 上传模板页面样式 */
.upload-template-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.upload-progress-bar {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.progress-step.active .step-number {
  background: #3b82f6;
  color: white;
}

.progress-step.current .step-number {
  background: #10b981;
  color: white;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.step-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-align: center;
}

.progress-step.active .step-label {
  color: #374151;
}

.upload-content {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
  overflow-y: auto;
}

.upload-step h3 {
  margin: 0 0 20px 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
}

.input-field, .textarea-field, .select-field {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.input-field:focus, .textarea-field:focus, .select-field:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.textarea-field {
  min-height: 100px;
  resize: vertical;
}

/* 思维导图选择网格 */
.mindmap-selection {
  margin-top: 16px;
}

.mindmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.mindmap-card {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.mindmap-card:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mindmap-card.selected {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.mindmap-preview {
  background: #f8fafc;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
  text-align: center;
}

.mindmap-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.mindmap-info p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

.mindmap-date {
  font-size: 12px;
  color: #9ca3af;
}

.selected-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

.selected-info {
  margin-top: 16px;
  padding: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clear-selection-btn {
  background: #dc2626;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

/* 市场选项样式 */
.market-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-option:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.radio-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.radio-option input[type="radio"] {
  margin: 0;
}

.radio-option span {
  font-weight: 500;
  color: #374151;
}

.radio-option p {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #6b7280;
}

/* 发布摘要样式 */
.publish-summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.summary-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 4px 0;
}

.info-item:last-child {
  margin-bottom: 0;
}

.label {
  font-weight: 500;
  color: #6b7280;
}

.value {
  color: #374151;
  text-align: right;
  max-width: 60%;
}

.terms-agreement {
  margin-top: 20px;
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  margin: 0;
}

/* 上传操作按钮 */
.upload-actions {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
}

.prev-btn, .next-btn, .publish-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.prev-btn {
  background: #f3f4f6;
  color: #6b7280;
}

.prev-btn:hover {
  background: #e5e7eb;
}

.next-btn {
  background: #3b82f6;
  color: white;
}

.next-btn:hover:not(:disabled) {
  background: #2563eb;
}

.next-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.publish-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.publish-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.publish-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* 我的模板页面样式 */
.my-templates-page {
  padding: 32px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
}

.my-templates-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 24px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.my-templates-header h3 {
  margin: 0 0 12px 0;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.my-templates-header p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  font-weight: 500;
}

.my-templates-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.my-templates-stats .stat-card {
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.my-templates-stats .stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.my-templates-stats .stat-card:hover::before {
  transform: scaleX(1);
}

.my-templates-stats .stat-card:hover {
  border-color: #667eea;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

.stat-icon {
  font-size: 28px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.stat-info {
  flex: 1;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: #1e293b;
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: #64748b;
  margin-top: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 空状态样式优化 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.6;
}

.empty-state h4 {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
}

.empty-state p {
  margin: 0 0 32px 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.6;
}

.upload-first-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.upload-first-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* 我的模板网格布局优化 - 横向排列 */
.my-templates-list .templates-grid,
.my-templates-grid .templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* 减小最小宽度，增加每行显示数量 */
  gap: 16px; /* 减小间距 */
  margin-top: 24px;
}

/* 响应式设计优化 */
@media (max-width: 1200px) {
  .my-templates-list .templates-grid,
  .my-templates-grid .templates-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .my-templates-list .templates-grid,
  .my-templates-grid .templates-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
  }
  
  .my-templates-page {
    padding: 20px;
  }
  
  .my-templates-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  }
  
/* 我的模板卡片样式优化 - 横向紧凑布局 */
.my-template-card {
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
    padding: 16px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1; /* 保持正方形 */
  overflow: hidden;
  min-height: 240px; /* 减小最小高度 */
  }
  
.my-template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.my-template-card:hover::before {
  transform: scaleX(1);
}

.my-template-card:hover {
  border-color: #10b981;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}

.template-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  }
  
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 顶部预览区域 - 紧凑版 */
.my-template-card .template-preview {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 12px;
  border-radius: 8px;
  font-size: 10px;
  color: #64748b;
  text-align: center;
  font-weight: 600;
  border: 2px dashed #cbd5e1;
  flex-shrink: 0;
  height: 50px; /* 减小高度 */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px; /* 为状态标识留出空间 */
  margin-bottom: 12px;
}

/* 信息区域 - 紧凑版 */
.my-template-card .template-info {
  flex: 1;
  display: flex;
    flex-direction: column;
  min-height: 0;
}

.my-template-card .template-info h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
  flex-shrink: 0;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1; /* 限制标题1行 */
  -webkit-box-orient: vertical;
}

.my-template-card .template-info p {
  margin: 0 0 8px 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 限制描述2行 */
  -webkit-box-orient: vertical;
  text-align: center;
  }
  
.my-template-card .template-meta {
  display: flex;
  justify-content: center;
    gap: 12px;
  margin-bottom: 8px;
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
}

.my-template-card .template-stats {
  display: flex;
  justify-content: space-around;
  margin: 8px 0 12px 0;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.stat-item {
  display: flex;
    flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  color: #64748b;
  font-weight: 600;
  text-align: center;
}

.stat-item .stat-icon {
  font-size: 12px;
  width: auto;
  height: auto;
  background: none;
  color: #64748b;
  border-radius: 0;
  box-shadow: none;
}

.template-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  flex-shrink: 0;
}

.action-btn {
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 9px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  flex: 1;
  max-width: 45px; /* 减小按钮宽度 */
}

.edit-btn {
  color: #3b82f6;
  border-color: #3b82f6;
}

.edit-btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.view-btn {
  color: #6b7280;
  border-color: #6b7280;
}

.view-btn:hover {
  background: #6b7280;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(107, 114, 128, 0.25);
}

.analytics-btn {
  color: #10b981;
  border-color: #10b981;
}

.analytics-btn:hover {
  background: #10b981;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.delete-btn {
  color: #dc2626;
  border-color: #dc2626;
}

.delete-btn:hover {
  background: #dc2626;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}



/* ===== 简洁版筛选栏样式 ===== */

/* 主容器 - 简洁扁平设计 */
.category-filter {
  margin-bottom: 20px !important;
  padding: 0 !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  overflow: hidden;
}

/* 筛选区域布局 */
.filter-section.horizontal-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #f8fafc;
  padding: 8px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.filter-group {
  margin-bottom: 8px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

/* 筛选标题样式 - 更简洁 */
.filter-header {
  margin-bottom: 4px;
}

.filter-label {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 按钮容器 */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

/* 简化的按钮样式 */
.filter-tab {
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 20px;
}

/* 简化的悬停效果 */
.filter-tab:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

/* 简化的选中状态 */
.filter-tab.active {
  background: #f1f5f9;
  border-color: #3b82f6;
  color: #3b82f6;
  font-weight: 500;
}

/* 市场类型简化样式 */
.market-tabs .filter-tab.free {
  color: #059669;
}

.market-tabs .filter-tab.free:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.market-tabs .filter-tab.free.active {
  background: #f0fdf4;
  border-color: #10b981;
  color: #059669;
}

.market-tabs .filter-tab.premium {
  color: #7c3aed;
}

.market-tabs .filter-tab.premium:hover {
  background: #faf5ff;
  border-color: #ddd6fe;
}

.market-tabs .filter-tab.premium.active {
  background: #faf5ff;
  border-color: #8b5cf6;
  color: #7c3aed;
}

/* 简化的统计信息区域 */
.filter-stats {
  padding: 6px 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 12px;
  color: #64748b;
}

.filter-stats strong {
  color: #3b82f6;
  font-weight: 500;
}

/* 响应式设计 - 简化版 */
@media (max-width: 768px) {
  .category-filter {
    margin: 0 -12px 16px -12px !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }
  
  .filter-section.horizontal-layout {
    padding: 12px 16px;
  }
  
  .filter-tabs {
    gap: 4px;
  }
  
  .filter-tab {
    padding: 4px 8px;
    font-size: 12px;
    min-height: 24px;
  }
  
  .filter-stats {
    padding: 8px 16px;
    font-size: 12px;
  }
}

/* 移除深色模式和复杂效果，保持简洁 */
.filter-tab:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

/* 高对比度模式简化 */
@media (prefers-contrast: high) {
  .filter-tab {
    border-width: 1px;
  }
  
  .filter-tab.active {
    border-width: 2px;
  }
}
